﻿// input 表单优化,
//使用方法onClick=mdata(当前ID，查询表名),包同时包含xajax的文件
function Offset(e)
//取标签的绝对位置
{
var t = e.offsetTop;
var l = e.offsetLeft;
var w = e.offsetWidth;
var h = e.offsetHeight-2;
while(e=e.offsetParent)
{
t+=e.offsetTop;
l+=e.offsetLeft;
}
return {
top : t,
left : l,
width : w,
height : h
}
}
function mdata(id,obj,divid){
	document.getElementById(obj).value=document.getElementById(id).innerHTML;
	document.getElementById(divid).style.display="none";
}
function arr(obj,t){
<!--	//第一步：取源位置
var offset=Offset(obj);
if(did=document.getElementById("selectof" + obj.name)){
	did.style.display="block";
	xajax_getvalue(t,obj.id,iDiv.id);
	}
var iDiv = document.createElement("div");
iDiv.id="selectof" + obj.name;
//iDiv.id="m";
iDiv.style.position = "absolute";
iDiv.style.width=offset.width*1.2 + "px";
iDiv.style.height=offset.height*10 + "px";
iDiv.style.top=offset.top+offset.height + "px";
iDiv.style.left=offset.left+2 + "px";
iDiv.style.background="#ffffff";
iDiv.style.border="1px solid #3366ff";
iDiv.style.fontSize="12px";
iDiv.style.lineHeight=offset.height + "px";
iDiv.style.textIndent="4px";
iDiv.onclick=function(){ this.style.display="none";};
document.body.appendChild(iDiv);


xajax_getvalue(t,obj.id,iDiv.id);

}
var xajaxRequestUri=window.location.href;
var xajaxDebug=false;
var xajaxStatusMessages=false;
var xajaxWaitCursor=true;
var xajaxDefinedGet=0;
var xajaxDefinedPost=1;
var xajaxLoaded=false;
function xajax_getvalue(){return xajax.call("getvalue", arguments, 1);}

window.setTimeout(function () { if (!xajaxLoaded) { alert('Error: the xajax Javascript file could not be included. Perhaps the URL is incorrect?\nURL: includes/class/xajax/xajax_js/xajax.js'); } }, 6000);
